package com.lotus.crm.service;

import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import com.lotus.crm.domain.Customer;

public interface CustomerService {
	/*
	 * 查找没有关联的用户，准备关联
	 */
	@Path("/findNoAssociationCustomers")
	@GET
	@Produces({ "application/xml", "application/json" })
	public List<Customer> findNoAssociationCustomers();
	
	/*
	 * 查找关联到指定定区的客户。
	 */
	@Path("/findHasAssociationFixedAreaCustomers/{fixedAreaId}")
	@GET
	@Consumes({ "application/xml", "application/json" })
	@Produces({ "application/xml", "application/json" })	
	public List<Customer> findHasAssociationFixedAreaCustomers(@PathParam("fixedAreaId") String fixedAreaId);
	
	/*
	 * 关联客户到定区
	 */
	@Path("/associateCustomersToFixedArea")
	@PUT
	void associateCustomersToFixedArea(@QueryParam("customerIdStr") String customerIdStr,
									    @QueryParam("fixedAreaId") String fixedAreaId);
	
	/**
	 * 对用户进行保存
	 */
	@Path("/customerSave")
	@POST
	@Consumes({ "application/xml", "application/json" })
	public void save(Customer customer);
	
	/*
	 * 通过手机号查询邮箱是否绑定
	 */
	@Path("/findByPhoneNum/{telephone}")
	@GET
	@Consumes({ "application/xml", "application/json" })
	@Produces({ "application/xml", "application/json" })
	public Customer findByTelephone(@PathParam("telephone") String telephone);
	
	/*
	 * 通过手机号对用户的邮箱进行验证
	 */
	@Path("/updateTypeByPhoneNum")
	@PUT
	@Produces({ "application/xml", "application/json" })
	public void updateTypeByTelephone(@QueryParam("telephone") String telephone);
	
	
}
